<template>

    <div>
        <van-tabbar v-model="active" placeholder v-show="isShow" active-color="#ff8d1a" z-index="1000">
            <van-tabbar-item icon="wap-home-o" to="home" name="home">首页</van-tabbar-item>
            <van-tabbar-item icon="location-o" to="nearby" name="nearby">附近</van-tabbar-item>
            <van-tabbar-item icon="eye-o" to="find" name="boutique">发现</van-tabbar-item>
            <van-tabbar-item icon="orders-o" to="order" name="order">订单</van-tabbar-item>
            <van-tabbar-item icon="user-o" to="my" name="my">我的</van-tabbar-item>
        </van-tabbar>
    </div>

</template>

<script setup>
import { ref, computed, onMounted } from 'vue'
import { useRoute, useRouter } from 'vue-router'
const route = useRoute()
const router = useRouter()
const isShow = computed(() => {
    return route.path == '/home' || route.path == '/nearby' || route.path == '/boutique' || route.path == '/order' || route.path == '/my' || route.path == '/concern' || route.path == '/sheet' || route.path == '/newgoods' || route.path == '/follow'
})
const active = computed({
    get() {
        if (route.path == '/concern' || route.path == '/sheet' || route.path == '/newgoods' || route.path == '/follow') return 'boutique'
        return route.name
    },
    set(val) {

    }
})
</script>

<style lang="scss" scoped>

</style>